package com.deng.etl.view
{
	import com.deng.etl.vo.EtlValidVo;
	import com.deng.util.GlobalProperties;
	
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	import mx.controls.Button;
	import mx.events.FlexEvent;

	public class EtlWorkloadValidReportBT extends Button
	{
		private var selVo:EtlValidVo;
		public function EtlWorkloadValidReportBT()
		{
			this.addEventListener(FlexEvent.CREATION_COMPLETE,showHandler);
			this.addEventListener(FlexEvent.SHOW,showHandler);
			this.addEventListener(MouseEvent.MOUSE_UP,upEvt);
			super();
			this.label = "请选择......";
			
		}
		private function upEvt(event:MouseEvent):void{	
			navigateToURL(
			new URLRequest(GlobalProperties._SERVER_URL+"/performance/frameset?__report=item_count_detail_directly.rptdesign&__title=单价项目明细分析&stat_time="+selVo.stat_time+"&organization_name="+selVo.organization_id),
			 "_blank");
		}
		private function showHandler(evt:FlexEvent):void{
			selVo = this.data as EtlValidVo;
		}
	}
}